Usually, when an instruction calculation device executes a calculation of an instruction sequence comprising four instructions as shown below, first, an instruction 1 is executed and next, an instruction 2 and an instruction 3 are executed by referring to the calculation result obtained by executing the instruction 1.
instruction 1: fmp S3←S1*S2
instruction 2: fmp S5←S3*S4
instruction 3: fad S6←S3+S4 instruction 4: fad S8←S6+S7
Where fmp (Floating Multiply) represents floating point multiplication and fad (Floating Add) represents floating point addition.
In this method, the instruction 2 and the instruction 3 are executed by using the calculation result obtained by executing the instruction 1. Therefore, the instruction calculation device cannot execute the instruction 2 and the instruction 3 before the completion of the execution of the instruction 1. The above-mentioned instruction sequence can be rewritten as the following instruction sequence by using a multiply-add instruction if the to instruction calculation device includes a fused multiply-adder that is a combined calculator to execute the multiply-add instruction.
instruction 1: fmp S3←S1*S2
instruction 2: fmp S5←S3*S4
instruction 3′: fad S6←S1*S2+S4
instruction 4: fad S8←S6+S7
In the above-mentioned instruction sequence, the instruction 3 is replaced with the instruction 3′ that is the multiply-add instruction. This is a difference between two instruction sequences mentioned above. In other words, when the instruction calculation device calculates this instruction sequence, a data processing has to be performed according to an order in which data is generated based on the relation between the data. Therefore, when the instruction calculation device executes this instruction sequence, the effect of shortening the processing time of the instruction calculation device is not obtained. In other words, when the instruction sequence in which the dependency relationship exists between a plurality of instructions is executed, even if a part of the instructions in the instruction sequence is replaced with a combined instruction such as the multiply-add instruction, the speed up of the calculation cannot be realized.
A calculation device in which an order of execution of instructions is changed between a process of a final loop of an instruction loop in which an instruction sequence A is repeated a plurality of times and an initialization process of an instruction sequence B subsequently executed after the execution of the instruction sequence A is disclosed in the Japanese Patent Application Laid-Open No. 2000-020310 (hereinafter, referred to as patent publication 1). The calculation device disclosed in this patent publication performs “instruction passing” in which one instruction is executed before executing another instruction which is initially decided to be executed before executing the one instruction. For this purpose, in an instruction issuance control device, a class bit representing whether data passing between instructions is executed or not is provided in a predetermined field of a format in which an instruction code is arranged. A technology with which the instruction issuance control device controls whether to execute the instruction passing by using the class bit has been disclosed. However, in the technology disclosed in patent publication 1, a user man-hour is required to arrange the class bit representing whether or not the dependency relationship of the data exists between the instructions in the predetermined field of the instruction in advance.
A technology with which a preceding store instruction is merged with a subsequent store instruction by store data merging means is disclosed in Japanese Patent Application Laid-Open No. 1992-112328 (hereinafter, referred to as patent publication 2).
A simulator which simulates a parallel calculation processing is disclosed in Japanese Patent Application Laid-Open No. 1999-238001 (hereinafter, referred to as patent publication 3). The patent publication discloses a simulation method with which an order of the calculation is determined based on a length of an execution cycle as an example of a simulation method.
The patent publications 2 and 3 do not disclose a technology to determine whether or not the dependency relationship of the data exists between the instructions without performing a particular process in advance.